package com.minhang.config;


import com.minhang.utils.StringToDateConverter;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author rookie
 */
@Configuration
public class WebConfigurer implements WebMvcConfigurer {

    @Override
    public void addFormatters(FormatterRegistry registry) {
        //注册引用时间类型转换类
        registry.addConverter(new StringToDateConverter());
    }

}
